<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: parttime
  Date: 2017/8/19
  Time: 下午16:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="resources.jsp" %>


<html>
<head>
    <title>资金明细</title>
</head>
<body>
<div>
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">查询条件</h3>
        </div>
        <div class="panel-body">
            <form class="form-inline">
                <div class="form-group">
                    <%--<label for="nick_name">昵称：</label>--%>
                    <input type="text" class="form-control" id="nick_name" name="nick_name"  placeholder="昵称">
                </div>
                <div class="form-group">
                    <%--<label for="order_no">订单号：</label>--%>
                    <input type="text" class="form-control" id="order_no" name="order_no" placeholder="订单号">
                </div>
                <div class="form-group">
                    <select id="type" name="type" class="form-control">
                        <option value = "">明细类型</option>
                         <c:forEach items="${typeList}" var="fundsType">
                             <option value = "${fundsType.type_id}">${fundsType.name}</option>
                         </c:forEach>
                    </select>
                </div>
                <div class="form-group">
                    <button type="button" class="btn btn-info btn-search">查询</button>
                    <button type="button" class="btn btn-reset btn-default">清空</button>
                </div>
            </form>
        </div>
    </div>
</div>

<div class="ems_table_content">
    <div class="panel panel-default">
        <div class="panel-heading">资金明细</div>
        <div id="toolbar">
            <div class="form-inline" role="form">
                <%--<button type="button" id="fundsrecord_add" class="btn btn-outline btn-success">--%>
                    <%--<i class="glyphicon glyphicon-plus" aria-hidden="true"></i>--%>
                    <%--添加--%>
                <%--</button>--%>
                <%--<button type="button" id="fundsrecord_modify" class="btn btn-outline btn-primary">--%>
                    <%--<i class="glyphicon glyphicon-edit" aria-hidden="true"></i>--%>
                    <%--修改--%>
                <%--</button>--%>
                <%--<button type="button" id="fundsrecord_delete" class="btn btn-outline btn-danger">--%>
                    <%--<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>--%>
                    <%--删除--%>
                <%--</button>--%>
            </div>
        </div>
        <table id="fundsRecordTable"
               data-url="/ems/fundsrecord/pagination"
               data-show-export="true">
            <thead>
            <tr>
                <th data-field="state" data-checkbox="true"></th>
                <th data-field="nick_name">昵称</th>
                <th data-field="order_no">订单号</th>
                <th data-field="action">资金变动动作</th>
                <th data-field="amount">金额</th>
                <th data-field="type">类型</th>
                <th data-field="create_time">创建时间</th>
            </tr>
            </thead>

        </table>
    </div>
</div>

<script>
    $(function () {
        $("#fundsRecordTable").createTable();

    })

</script>


<script>
    function statusFormat(srcValue) {
        if (srcValue == 0) {
            return "<span style='color: red;font-weight: bold' >充值失败</span>";
        } else if(srcValue == 1) {
            return "<span style='color: #3cb371;font-weight: bold'>充值成功</span>";
        }
    }

</script>

</body>
</html>
